version: '3'

services:
  alfa:
    build:
      context: .
      dockerfile: Dockerfile.alfa
    environment:
      - BRAVO_ZULU=/shared/foo.txt
    volumes:
      - shared-volume:/shared

  bravo:
    build:
      context: .
      dockerfile: Dockerfile.bravo
    volumes:
      # - /opt/foo.txt:/shared/foo.txt
      # You can also use a named volume for better portability
      - shared-volume:/shared
    command: sleep infinity

volumes:
  shared-volume:
